An image forming apparatus equipped with a sensor is known. For example, the sensor includes a hook having a claw section. A clamping section for clamping the claw section is arranged in a frame. The sensor is fixed in the frame through the clamping of the claw section of the hook with the clamping section.
Sometimes, the image forming apparatus is vibrated when being conveyed. The claw section of the hook may deviate from the clamping section when the vibration is violent. If the claw section of the hook deviates from the clamping section, then the internal sensor of the image forming apparatus may fall off.